home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / glass / glass.lha / GLASS / tmc / cal.ht < prev    next >
Text File  |  1990-11-06  |  4KB  |  196 lines

  1. /* 
  2.    Copyright (C) 1990 C van Reewijk, email: dutentb.uucp!reeuwijk
  3.  
  4. This file is part of GLASS.
  5.  
  6. GLASS is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 1, or (at your option)
  9. any later version.
  10.  
  11. GLASS is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GLASS; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. .. file: cal.ht
  21. .error Warning: 'cal' library is obsolete, use 'calu' library.
  22. /* ---- start of ${tplfilename} ---- */
  23. /* Definition C datastructures (Version for array list).
  24.  
  25.    template file:      ${tplfilename}
  26.    datastructure file: ${dsfilename}
  27.    tm version:         $(tmvers) ($(tmdate))
  28.  */
  29.  
  30. .foreach t $(need_ds_list)
  31. typedef struct str_$t_list *$t_list;
  32. .endforeach
  33. .foreach t $(need_ds)
  34. typedef struct str_$t *$t;
  35. .foreach c ${conslist $t}
  36. typedef struct str_$c *$c;
  37. .endforeach
  38. .endforeach
  39.  
  40. .foreach t $(need_ds)
  41. #define $tNIL ($t)0
  42. .endforeach
  43. .foreach t $(need_ds_list)
  44. #define $t_listNIL ($t_list)0
  45. .endforeach
  46.  
  47. .foreach t $(need_ds)
  48. .if ${len ${conslist $t}}
  49. typedef enum en_tags_$t {
  50.     ${seplist ", " ${prefix TAG ${conslist $t}}}
  51. } tags_$t;
  52.  
  53. .endif
  54. .endforeach
  55.  
  56. .foreach t $(need_ds)
  57. struct str_$t {
  58. .if ${len ${conslist $t}}
  59.     tags_$t tag;
  60. .endif
  61. .foreach sname ${telmlist $t}
  62. .if ${eq list ${ttypeclass $t $(sname)}}
  63.     ${ttypename $t $(sname)}_list $(sname);
  64. .else
  65.     ${ttypename $t $(sname)} $(sname);
  66. .endif
  67. .endforeach
  68. };
  69.  
  70. .foreach c ${conslist $t}
  71. struct str_$c {
  72.     tags_$t tag;
  73. .foreach sname ${celmlist $t $c}
  74. .if ${eq list ${ctypeclass $t $c $(sname)}}
  75.     ${ctypename $t $c $(sname)}_list $(sname);
  76. .else
  77.     ${ctypename $t $c $(sname)} $(sname);
  78. .endif
  79. .endforeach
  80. };
  81.  
  82. .endforeach
  83. .endforeach
  84. .foreach t $(need_ds_list)
  85. struct str_$t_list {
  86.     unsigned int sz;
  87.     unsigned int room;
  88.     $t *arr;
  89. };
  90.  
  91. .endforeach
  92. /* new_<cons> and new_<type>routines */
  93. .foreach t $(want_new)
  94. .if ${len ${telmlist $t}}
  95. extern $t new_$t();
  96. .else
  97. .foreach c ${conslist $t}
  98. extern $t new_$c();
  99. .endforeach
  100. .endif
  101. .endforeach
  102. .foreach t $(want_new_list)
  103. extern $t_list new_$t_list();
  104. .endforeach
  105.  
  106. /* room_<type>_list() routines */
  107. .foreach t $(want_room_list)
  108. extern void room_$t_list();
  109. .endforeach
  110.  
  111. /* app_<type>_list() routines */
  112. .foreach t $(want_app_list)
  113. extern void app_$t_list();
  114. .endforeach
  115.  
  116. /* ins_<type>_list() routines */
  117. .foreach t $(want_ins_list)
  118. extern void ins_$t_list();
  119. .endforeach
  120.  
  121. /* del_<type>_list() routines */
  122. .foreach t $(want_del_list)
  123. extern void del_$t_list();
  124. .endforeach
  125.  
  126. /* conc_<type>_list() routines */
  127. .foreach t $(want_conc_list)
  128. extern void conc_$t_list();
  129. .endforeach
  130.  
  131. /* fre_<type>_list() routines */
  132. .foreach t $(want_fre_list)
  133. extern void fre_$t_list();
  134. .endforeach
  135. .foreach t $(want_fre)
  136. extern void fre_$t();
  137. .endforeach
  138.  
  139. /* rfre_<type>_list() routines */
  140. .foreach t $(want_rfre_list)
  141. extern void rfre_$t_list();
  142. .endforeach
  143. .foreach t $(want_rfre)
  144. extern void rfre_$t();
  145. .endforeach
  146.  
  147. /* print_<type>() routines */
  148. .foreach t $(want_print)
  149. extern void print_$t();
  150. .endforeach
  151. .foreach t $(want_print_list)
  152. extern void print_$t_list();
  153. .endforeach
  154.  
  155. /* fprint_<type>() routines */
  156. .foreach t $(want_fprint)
  157. extern void fprint_$t();
  158. .endforeach
  159. .foreach t $(want_fprint_list)
  160. extern void fprint_$t_list();
  161. .endforeach
  162.  
  163. /* rdup_<type>() routines */
  164. .foreach t $(want_rdup)
  165. extern $t rdup_$t();
  166. .endforeach
  167. .foreach t $(want_rdup_list)
  168. extern $t_list rdup_$t_list();
  169. .endforeach
  170.  
  171. /* fscan_<type>() routines */
  172. .foreach t $(want_fscan)
  173. extern int fscan_$t();
  174. .endforeach
  175. .foreach t $(want_fscan_list)
  176. extern int fscan_$t_list();
  177. .endforeach
  178.  
  179. /* cmp_<type>() routines */
  180. .foreach t $(want_cmp)
  181. extern int cmp_$t();
  182. .endforeach
  183. .foreach t $(want_cmp_list)
  184. extern int cmp_$t_list();
  185. .endforeach
  186.  
  187. /* misc. functions */
  188. .if ${index flush_$(basename) $(want_misc)}
  189. extern void flush_$(basename)();
  190. .endif
  191. .if ${index stat_$(basename) $(want_misc)}
  192. extern void stat_$(basename)();
  193. .endif
  194.  
  195. /* ---- end of ${tplfilename} ---- */
  196.